
import request from '@/utils/request'

/***************************************************** qywork ****************************************************/
export const getJsConfigApi: IGetJsConfigApi = function(data) {
    return request.post(`htscrm/work/auth/config`, data) as ReturnType<IGetJsConfigApi>
}
export const getAgentConfigApi: IGetAgentConfigApi = function(data) {
    return request.post(`htscrm/work/auth/agent_config`, data) as ReturnType<IGetAgentConfigApi>
}

// 
export const getWorkInfoApi = function() {
    return request.get(`htscrm/work/info`)
}
// 
export const qyLoginApi = function(data:any) {
    return request.get(`htscrm/work/auth/login`, data)
}
// 
export const qyAuthCodeApi = function(data:any) {
    return request.get(`htscrm/work/auth/code_url`, data)
}
// 
export const getUserInfoApi = function(data:any) {
    return request.get(`htscrm/work/user/info`, data)
}
// 
export const updateUserInfoApi = function(data:any) {
    return request.post(`htscrm/work/user/edit`, data)
}
// 
export const getUserLevelApi = function() {
    return request.post(`htscrm/work/user/level`)
}
// 
export const getUserTagListApi = function(data:any) {
    return request.post(`htscrm/work/user/tag-list`, data)
}
// 
export const updateUserTagApi = function(data:any) {
    return request.post(`htscrm/work/user/make-tag`, data)
}
// 
export const bindStoreApi = function(data:any) {
    return request.post(`htscrm/work/user/bind_store`, data)
}